<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <h2>{{fullName}}</h2>
    </div>
</body>
<script src='../js/vue.js'></script>
<script>
    let app = new Vue({
        el: '#app',
        data: {
             msg:'hello vue.js',
             firstName:'kobe',
             lastName:'bryant'
        },
        computed: {
            // 计算属性一般没有set方法,是只读属性
            fullName: {
                get: function() {
                    return this.firstName + ' ' + this.lastName
                }
            }
        },
        methods: {}
    })
</script>
</html>